<div id = 'detectionRecord'>
  <div nz-form-item nz-row style="margin-top:15px;margin-bottom:10px;">
    <div nz-col [nzSpan]="6">
      <button nz-button [nzType]="'primary'" [nzSize]="'small'" col-offset-2 (click)="toBack()">
        <i class="anticon anticon-left"></i>
        <span>返回</span>
      </button>
    </div>
  </div>
  <nz-collapseset>
    <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
      <form nz-form>
        <div nz-form-item nz-row style="margin-bottom: 12px">
          <div nz-form-label nz-col  [nzSpan]="2">
            <label>使用单位</label>
          </div>
          <div nz-form-control nz-col [nzSpan]="3">
            <nz-input [(ngModel)]="detectionRecord.usedPartyName" name="planName">
            </nz-input>
          </div>

          <div nz-form-label nz-col  [nzSpan]="2">
            <label>维保单位</label>
          </div>
          <div nz-form-control nz-col [nzSpan]="3">
            <nz-input [(ngModel)]="detectionRecord.maintenancePartyName" name="planName">
            </nz-input>
          </div>

          <div nz-form-label nz-col [nzSpan]="2">
            <label>检查时间</label>
          </div>
          <div nz-form-control nz-col [nzSpan]="7" >
            <nz-datepicker [nzSize]="'large'" [nzFormat]="'YYYY-MM-DD'" name="startDate" [nzPlaceHolder]="'开始日期'" [(ngModel)]="detectionRecord.startDate"></nz-datepicker>
            ~
            <nz-datepicker [nzSize]="'large'" [nzFormat]="'YYYY-MM-DD'" name="endDate" [nzPlaceHolder]="'结束日期'" [(ngModel)]="detectionRecord.endDate"></nz-datepicker>
          </div>

          <button [nzSize]="'large'" nz-button  [nzType]="'primary'" (click)="query()">查询</button>
        </div>
      </form>
    </nz-collapse>
  </nz-collapseset>
  <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
    <thead nz-thead>
    <tr>
      <th nz-th [nzCheckbox]="true">
        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
        </label>
      </th>
      <th nz-th>
        <span>电梯编码</span>
      </th>
      <th nz-th>
        <span>使用单位</span>
      </th>
      <th nz-th>
        <span>维保单位</span>
      </th>
      <th nz-th>
        <span>检查状态</span>
      </th>
      <th nz-th>
        <span>检查时间</span>
      </th>
      <th nz-th>
        <span>检测负责人签字1</span>
      </th>
      <th nz-th>
        <span>检测负责人签字2</span>
      </th>
      <th nz-th>
        <span>被检查单位人员签字</span>
      </th>
      <th nz-th>
        <span>详情</span>
      </th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of list">
      <td nz-td [nzCheckbox]="true">
        <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
        </label>
      </td>
      <td nz-td>{{data.elevatorNum}}</td>
      <td nz-td>{{data.usedPartyName}}</td>
      <td nz-td>{{data.maintenancePartyName}}</td>
      <td nz-td>{{data.isPass | constantTransfer : config.CHECK_STATUS }}</td>
      <td nz-td>{{data.checkTime | timeTrans}}</td>
      <td nz-td>
        <img *ngIf="data.detecteUserSignFirst" src="{{data.detecteUserSignFirst}}" width="120px" height="40px" />
      <td nz-td>
        <img *ngIf="data.detecteUserSignSecond" src="{{data.detecteUserSignSecond}}" width="120px" height="40px" />
      </td>
      <td nz-td>
        <img *ngIf="data.beCheckPartyUserSign" src="{{data.beCheckPartyUserSign}}" width="120px" height="40px" />
      </td>
      <td nz-td>
        <span>
          <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="toDetail(data.id)">详情</button>
        </span>
      </td>

    </tr>
    </tbody>
  </nz-table>
  <nz-pagination [nzPageIndex]="detectionRecord.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger (nzPageSizeChange)="nzPageSizeChange($event)"
                 (nzPageIndexChange)="nzPageIndexChange($event)" (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="detectionRecord.pageSize"></nz-pagination>

<!--
  <ng-template #titlepic>
    <span>图片</span>
  </ng-template>
  <ng-template #contentpic>
    <enlarge-pic [inValue]="picList" (outPut)="addOutPut($event)"></enlarge-pic>
  </ng-template>
  <ng-template #footerpic>
    <div>
    </div>
  </ng-template>-->

</div>
